<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单输入绑定</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
</head>


<body>
    <div id="app">
        <span>—————————多选———————————</span><br>

        <input type="checkbox" id="a1" value="宇智波佐助" v-model="checkboxname"><label for="a1">宇智波佐助</label>

        <input type="checkbox" id="a2" value="漩涡鸣人" v-model="checkboxname"><label for="a2">漩涡鸣人</label>


        <input type="checkbox" id="a3" value="旗木卡卡西" v-model="checkboxname"><label for="a3">旗木卡卡西</label>

        <input type="checkbox" id="a4" value="宇智波鼬" v-model="checkboxname"><label for="a3">宇智波鼬</label>

        <p> 你选择了： {{checkboxname.join("-")}}</p>

        <span>——————————单选————————————</span>
        <div>
            <input type="radio" id="b1" value="宇智波佐助" v-model="checkboxname2"><label for="b1">宇智波佐助</label>

            <input type="radio" id="b2" value="漩涡鸣人" v-model="checkboxname2"><label for="b2">漩涡鸣人</label>

            <input type="radio" id="b3" value="旗木卡卡西" v-model="checkboxname2"><label for="b3">旗木卡卡西</label>

            <input type="radio" id="b4" value="宇智波鼬" v-model="checkboxname2"><label for="b3">宇智波鼬</label>

            <p> 你选择了： {{checkboxname2}}</p>

        </div>
        <span>——————————选择—————————————</span>
        <div>
            <!-- 方法一 -->
            <select v-model="selected">
                <option>A</option>
                <option>B</option>
                <option>C</option>
                <option>D</option>
            </select>

            <span>你的ID是:{{selected}}</span>
        </div>
        <!-- 方法二 -->
        <div>
            <select v-model="select">
                <option v-for="i in ['///','litch','img']" v-bind:valua="i">{{i}}</option>
            </select>
            <span> 你的id是：{{select}}</span>

        </div>
        <div>
            <span>——————————修饰符————————————</span><br>
            <input v-model.lazy.number.trim="img">
            1+{{img}}={{img+1}}

        </div>

    </div>

    <script>
        let app = new Vue({
            el: "#app",
            data: {
                checkboxname: [],
                checkboxname2: '',
                selected: "",
                select: "",
                img: '',
            }

        })

    </script>


</body>

</html>